<!--
/* 
 * JUGJobs - A Jobs Posting Application for Java Users Groups and Other Groups
 * $Id: editJob.jsp,v 1.4 2007/01/25 00:56:06 biglee Exp $
 * 
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is the JUGJobs project.
 *
 * The Initial Developers of the Original Code are the members of the Triangle
 * Java User's Group in the RTP area of North Carolina.
 * Portions created by the Initial Developer are Copyright (C) 2005
 * the Initial Developers. All Rights Reserved.
 *
 * Contributor(s):
 * rc
 *
 * ***** END LICENSE BLOCK ***** 
 */
 -->
<%@ taglib uri="/tags/struts-html"  prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-bean" 	prefix="bean" %>

<%@ page import="org.jugjobs.controller.Constants" %>
    
  <jsp:useBean id='currentJobBean' scope="session" class='org.jugjobs.form.JobBean' />

    <html:form action="saveJob.do" method="POST" >
      <h2><bean:message key="jugjobs.editjob.text.header"/></h2>
      
      <table>  <%--  border="1" cellpadding="4" cellspacing="0" --%> 
      
      <tr>  <!-- Company name -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.coname"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="coname" property="coname">
    				<div style='color:red'>
					<bean:write name="coname" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="employer_name" size="36"/>
        </td>
        <td>
            <span class="instr">
               <bean:message key="jugjobs.editjob.text.coname.instr"/>
            </span>
        </td>
      </tr>
      
      <tr>  <!-- Company URL -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.courl"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="courl" property="courl">
    				<div style='color:red'>
					<bean:write name="courl" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="employer_url" size="36"/>
            </td>
		    <td>
              <span class="instr">
                <bean:message key="jugjobs.editjob.text.courl.instr"/>
              </span>
           </td>
      </tr>
      
      <tr>  <!-- Job Title -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.jobtitle"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="jobtitle" property="jobtitle">
    				<div style='color:red'>
					<bean:write name="jobtitle" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="job_title" size="36"/>
        </td>
		    <td>
              <span class="instr">
                <bean:message key="jugjobs.editjob.text.jobtitle.instr"/>
              </span>
           </td>
      </tr>
      
      <tr>  <!-- Contact Name -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.contname"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="contactname" property="contactname">
    				<div style='color:red'>
					<bean:write name="contactname" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="contact_name" size="36"/>
		</td>
		<td>
          <span class="instr">
            <bean:message key="jugjobs.editjob.text.contname.instr"/>
          </span>
        </td>
      </tr>
      
      <tr>  <!-- Contact Information -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.coinfo"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="contact" property="contact">
    				<div style='color:red'>
					<bean:write name="contact" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="contact_info" size="36"/>
		</td>
		<td>
          <span class="instr">
            <bean:message key="jugjobs.editjob.text.coinfo.instr"/>
          </span>
        </td>
      </tr>
      
      <tr>  <!-- Posting Password -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.postpw"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="password" property="password">
    				<div style='color:red'>
					<bean:write name="password" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="posting_password" size="36"/>
        </td>
        <td>
          <span class="instr">
            <bean:message key="jugjobs.editjob.text.postpw.instr"/>
          </span>
        </td>
      </tr>
      <tr>  <!-- captcha - screen out bots -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.captcha"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="captcha" property="captcha">
    				<div style='color:red'>
					<bean:write name="captcha" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="captcha" size="10" maxlength="4"/>
        </td>
       <td>
          <span class="instr">
            <bean:message key="jugjobs.editjob.text.captcha.instr"/>
            <br />
  			<img src='./br/?digitImage=0'>
  			<img src='./br/?digitImage=1'>
  			<img src='./br/?digitImage=2'>
  			<img src='./br/?digitImage=3'>

          </span>
        </td>
      </tr>
     <tr>  <!-- Admin Contact Point -->
        <td valign="middle" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.adminco"/></td>
        <td valign="middle" align="left">
        	<logic:messagesPresent>
  				<html:messages id="admincontact" property="admincontact">
    				<div style='color:red'>
					<bean:write name="admincontact" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
            <html:text property="admin_contact_info" size="36"/>
        </td>
        <td>
          <span class="instr">
            <bean:message key="jugjobs.editjob.text.adminco.instr"/>
          </span>
        </td>
      </tr>

      <tr>  <!-- Job Description -->
        <td valign="top" align="right" nowrap style='background-color:lightblue'><bean:message key="jugjobs.editjob.text.jobdesc"/></td>
        <td valign="middle" align="left" colspan="2">
        	<logic:messagesPresent>
  				<html:messages id="jobdesc" property="jobdesc">
    				<div style='color:red'>
					    <bean:write name="jobdesc" filter='false'/>
    				</div>
  				</html:messages>
			</logic:messagesPresent>
			<span class="instr">
    			<bean:message key="jugjobs.editjob.text.jobdesc.instr"/>
    		</span><br/>
            <html:textarea property="job_desc" rows="8" cols="55"/><br/>
			<span class="instr">
    			<bean:message key="jugjobs.editjob.text.jobdesc.instr2"/>
    		</span><br/>
        </td>
      </tr>
      
      <tr>  <!-- Control Buttons at bottom-->
        <td valign="middle"  colspan="3">
            <html:submit value="<%= Constants.UPDATE_BUTTON_VALUE%>" property="button" />
            <html:hidden property="job_number" />

			<logic:notEqual name="currentJobBean" property="job_number" value="-1">
            	<html:submit value="Delete job" property="button" />
            </logic:notEqual>
            <%--html:reset value="RESET FIELDS"/ --%>
          &nbsp;
          <html:cancel value="<%= Constants.CANCEL_BUTTON_VALUE%>" />
        </td>
      </tr>
      </table>
    </html:form>
